package com.zues.service.impl;

import com.zues.service.Calculator;

public class CalculatorStaticProxy implements Calculator {

    private Calculator target;


    public CalculatorStaticProxy(Calculator target) {
        this.target = target;
    }

    @Override
    public int add(int i, int j) {
        // 通过目标对象来实现核心业务逻辑
        int addResult = target.add(i, j);
        return 0;
    }

    @Override
    public int sub(int i, int j) {
        return target.sub(i,j);
    }

    @Override
    public int mul(int i, int j) {
        return target.mul(i,j);
    }

    @Override
    public int div(int i, int j) {
        return target.div(i, j);
    }
}
